﻿<%
'
' 文件/文件夹操作函数
' 函数命名：fMyName

'按路径生成文件夹
' 参数说明： fso 对象， path 文件绝对路径
' 返回：成功返回 true ，失败返回 False
Function fCreateFolderByPath(fso, path)
	Err.Clear
	fCreateFolderByPath=False
	separate = "\"
	On Error Resume Next
	dim pathArray,pathArrayCount
	pathArray = Split(Trim(path&""), separate)
	pathArrayCount = UBound(pathArray)
	If pathArray(pathArrayCount)="" Then pathArrayCount=pathArrayCount-1
	path = ""
	For i = 0 To pathArrayCount
		If path <> "" Then path = path & separate
		path = path & pathArray(i)
		if (fso.FolderExists(path) = false) Then fso.CreateFolder(path)
	Next
	If Err.Number=0 Then fCreateFolderByPath = True
	Err.Clear
End Function

%>